﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="frmRegistrarArea.aspx.cs" Inherits="SISLOG.Web.frmRegistrarArea" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:FormView ID="FormView1" runat="server" DataSourceID="ObjectDataSource1" 
        DefaultMode="Insert">
        <EditItemTemplate>
            IdArea:
            <asp:TextBox ID="IdAreaTextBox" runat="server" Text='<%# Bind("IdArea") %>' />
            <br />
            NombreArea:
            <asp:TextBox ID="NombreAreaTextBox" runat="server" 
                Text='<%# Bind("NombreArea") %>' />
            <br />
            <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" 
                CommandName="Update" Text="Actualizar" />
            &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" 
                CausesValidation="False" CommandName="Cancel" Text="Cancelar" />
        </EditItemTemplate>
        <InsertItemTemplate>
            IdArea:
            <asp:TextBox ID="IdAreaTextBox" runat="server" Text='<%# Bind("IdArea") %>' />
            <br />
            NombreArea:
            <asp:TextBox ID="NombreAreaTextBox" runat="server" 
                Text='<%# Bind("NombreArea") %>' />
            <br />
            <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" 
                CommandName="Insert" Text="Insertar" />
            &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" 
                CausesValidation="False" CommandName="Cancel" Text="Cancelar" />
        </InsertItemTemplate>
        <ItemTemplate>
            IdArea:
            <asp:Label ID="IdAreaLabel" runat="server" Text='<%# Bind("IdArea") %>' />
            <br />
            NombreArea:
            <asp:Label ID="NombreAreaLabel" runat="server" 
                Text='<%# Bind("NombreArea") %>' />
            <br />
            <asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" 
                CommandName="New" Text="Nuevo" />
        </ItemTemplate>
    </asp:FormView>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        DataObjectTypeName="SISLOG.BusinessEntities.Area" InsertMethod="RegistrarArea" 
        onobjectcreating="ObjectDataSource1_ObjectCreating" 
        SelectMethod="GetAllFromAreaByIdArea" TypeName="SISLOG.BusinessLogic.AreaBL">
        <SelectParameters>
            <asp:Parameter Name="idArea" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>
